<@master template="master/master-loan"  title="财务信息管理">
<div class="detailsBox">
	<div class="openBox">
	<div class="detaiTab">
	 <form  name="module" id="module" action="<@url value='/report/downMonth'/>" method ='post'  target="_blank"   class="action-ajax-form-valid action-ajax-form-confirm" >
 			<table width="100%" cellspacing="0" cellpadding="0" border="0">
                  <tbody>
                      <tr>
                          <td width="15%" align="right" class="bg">统计月份:</td>
                          <td width="35%">
                           		 <input id="report_data" name="report_data"  type="text" runat="server" onclick="WdatePicker({dateFmt:'yyyyMM'})"                   class="Wdate" maxlength="6" />                          </td>
                      </tr>
                      <@permission permissionName="downMonth">
	                      <tr>	
	                          <td align="right" class="bg">&nbsp;</td>
	                          <td width="35%">
	                             <input type="hidden" name="type" id="type">
	                             <input type="button" name="comfirm" id="excel"   class="btn_auto_30 btn_blue mtb20" value="月报导出" >&nbsp;
	                           	<!--  <input type="hidden" name="comfirm" id="email"  class="btn_auto_30 btn_blue mtb20" value="月报发送"> -->
							  </td>
	                      </tr>
                      </@permission>
                 </tbody>
             </table>
     </form> 
     </div>
     </div>   
</div> 


 
     <@js>
         $("#excel").click(function(){
               $("#module").attr("action-ajax-form-confirm-message","");
               $("#module").attr("class","");
               $("#type").val("excel");
               var report_data=$("#report_data").val();
               var reg  = /^((19|20)\d{2})(0[1-9]|1[012])$/;
               if(report_data && reg.test(report_data)){
               		$("#module").submit();
               }else{
               		alert("必须输入yyyyMM格式的时间");
               }
         });
     	 $("#email").click(function(){
           	   $("#type").val("email");
           	   $("#module").attr("action-ajax-form-confirm-message","确认将以邮件方式发送该月报！");
               $("#module").attr("class","action-ajax-form action-ajax-form-valid action-ajax-form-confirm");
               var report_data=$("#report_data").val();
               var reg  = /^((19|20)\d{2})(0[1-9]|1[012])$/;
               if(report_data && reg.test(report_data)){
               		$("#module").submit();
               }else{
               		alert("必须输入yyyyMM格式的时间");
               }
         });
     
     </@js>
     <@jsRender/>
     <@js src="js.coolautosuggest"/>
</@master>	